package com.yy.wga.goods.feign.api;

import com.yy.wga.common.core.dto.Result;
import com.yy.wga.goods.feign.request.BuyGoodsCreateOrderRequest;
import com.yy.wga.goods.feign.request.GoodsUpGradeGetRequest;
import com.yy.wga.goods.feign.request.GoodsUpGradeInfoRequest;
import com.yy.wga.goods.feign.request.QueryGoodsPayResultRequest;
import com.yy.wga.goods.feign.response.BuyGoodsCreateOrderResponse;
import com.yy.wga.goods.feign.response.GoodsDetailResponse;
import com.yy.wga.goods.feign.response.GoodsUpGradeInfoResponse;
import com.yy.wga.goods.feign.response.QueryGoodsPayResultResponse;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;
import java.util.List;

/**
 * 商品大礼包管理
 *
 * @author guochao
 * @since 2024-10-25 21:46:26
 */
@RestController
@RequestMapping("api/goods/upGrade")
public interface GoodsUpGradeFeign {
    /**
     * 商品列表
     *
     * @return
     */
    @PostMapping("list")
    Result<List<GoodsUpGradeInfoResponse>> list(@RequestBody @Valid GoodsUpGradeInfoRequest request);

    /**
     * 获取商品详情
     *
     * @param request
     * @return
     */
    @PostMapping("get")
    Result<GoodsDetailResponse> get(@RequestBody @Valid GoodsUpGradeGetRequest request);

    /**
     * 商品购买 - 1.预订单
     *
     * @param request
     * @return
     */
    @PostMapping("createOrder")
    Result<BuyGoodsCreateOrderResponse> createOrder(@RequestBody @Valid BuyGoodsCreateOrderRequest request);

    /**
     * 查询支付结果
     *
     * @param request
     * @return
     */
    @PostMapping(value = "/queryPayResult", produces = "application/json")
    Result<QueryGoodsPayResultResponse> queryPayResult(@RequestBody @Valid QueryGoodsPayResultRequest request);
}
